import java.util.Scanner;

public class Java049 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String parent = sc.nextLine();
        String children = sc.nextLine();
        COUNT(parent,children);
    }

    private static void COUNT(String parent, String children) {
        int count = 0;
        int flag=0;
        for(int i =0 ;i<parent.length();i++){
            int j;
            flag=i;
            for ( j = 0;j<children.length();j++){
                if(parent.charAt(flag)==children.charAt(j)){
                    if(flag+1<=parent.length()){
                        flag++;
                    }else {
                        break;
                    }
                    if(j==children.length()-1){
                        i=flag-1;
                        count++;
                    }
                }else {
                    break;
                }
            }

        }

        System.out.println(count);
    }
}
